package com.swt.gap.service;

import com.swt.gap.common.PageResult;
import com.swt.gap.model.vo.ResultStatisticsVO;
import com.swt.gap.model.vo.achievementcenter.*;
import com.swt.gap.model.vo.AchievementInfoVO;

import java.util.List;


/**
 * @author tyh
 * @date 2020/5/11 19:29
 */
public interface AchievementService {

    //判断战果名是否重名
    Boolean judgeName(Integer userId, String achievementName, Integer achievementId);

    int addAchievement(int userId ,AddOrUpdateAchievementModel achievement);
    int updateAchievement(AddOrUpdateAchievementModel achievement);

    AchievementInfoVO getAchievementInfo(Integer achievementId);

//    AchievementCenterIndexVO getAchievementList(int userId,String keyword);

    PageResult<TinyAchievementInfoVO> searchAchievement(int userId, String keyword, int orderType, int pageNum, int pageSize);

    int deleteAchievement(int[] achievementIds);

    List<AchievementListVO> listAchievement(Integer userId, String keyword);

    List<ResultStatisticsVO> statisticsResult(String field, Integer resultId);

    /**
     * 战果列表 第三版
     */
    PageResult<AchievementInfoListVO> listAchievement3(Integer userId, String keyword, Integer pageNum, Integer pageSize);

    Boolean hasWritePermission(Integer userId, Integer achievementId);

    Integer updatePassword(AchievementPassword achievementPassword);

    Boolean getReadPerm(Integer achievementId, String password);
}
